#include<iostream>
#include<memory>


#include"UdpServer.hpp"

void Usage(std::string proc)
{
    std::cout<<"Usage \n\t"<<proc<<"local_ip local_port"<<std::endl;
}

int main(int argc, char* argv[])
{
    if(argc != 3)
    {
        Usage(argv[0]);
        exit(USAGE_ERROR);
    }
    EnableScreen();

    std::string ip = argv[1];
    uint16_t port = std::stoi(argv[2]);
    std::unique_ptr<Udpserver> usvr = std::make_unique<Udpserver>(ip,port);//c++ 14
    usvr->InitUdpserver();
    usvr->Start();

    return 0;

}